package test.util
{
	import librus.cheeseChaser.util.Util;
	
	import org.flexunit.assertThat;

	public class ShuffleTest
	{
		[Test]
		public function testShuffle():void
		{
			var i:int;
			var a:Array = [];
			for (i=0; i< 100;i++)
				a.push(i);
			
			var b :Array = Util.shuffleArray(a);
			
			var delta:int =0;
			
			for (i=0; i< a.length;i++)
			{
				var index:int = b.indexOf(a[i]);
				
				if (index != -1)
					delta += Math.abs(i - index);
			}
			
			assertThat(delta != 0);
		}
			
	}
}